<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Sports Center Member Management System</title>
<style>
.error{
	color: #ff0000;
	font-weight: bold;
}
</style>
</head>
<body>
	<form method="POST" action="<c:url value="/subject/addSJ"/>" >
		<input type="text" name="sjName" size="28" />
		<input type="submit" value="추가" />
	</form>
	<br>
	<br>과목리스트<br>
	<br>
	<table border="1">
		<tr>
			<th>과목번호</th>
			<th>과목이름</th>
			<th></th>
		</tr>
		<c:forEach items="${sjList }" var="subject">
			<tr>
				<td>${subject.subjectId }</td>
				<td>${subject.title }</td>
				
				<td>
				<form method="post" action="<c:url value="/subject/removeSJ"/>">
						<input name="subSeq" type="hidden"
							value="${subject.subjectId }" /> 
							<input type="submit" value="삭제" />
				</form>
				</td>
				<!--  <td><input type="submit" onclick="remove?memberName=${guest.name }" value="삭제" /></td>-->
				<!-- <td><a href="remove?memberName=${guest.name }">remove</a></td> --> 
			</tr>
		</c:forEach>
	</table>

</body>
</html>